]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
polkitAgent: Reset dialog to defaults after cancelling polkit session
authorJonas Dreßler <verdre@v0yd.nl>
Sun, 23 Jun 2019 14:33:20 +0000 (16:33 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 5 Nov 2019 17:52:33 +0000 (18:52 +0100)
Since we don't know if polkit/PAM will request a password (emitting the
"request" signal) or use another authentication method like a
fingerprint after the current authentication failed, hide the password
field and make the "Authenticate" button insensitive after cancelling
the session, just like we do when creating the dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

js/ui/components/polkitAgent.js

index e304c2a4638f41baf54a971e7db76e504eda4162..6367bcc8f10839ee01b2839d6fedee1399878902 100644 (file)
@@ -304,6 +304,10 @@ var AuthenticationDialog = GObject.registerClass({
             this._session.disconnect(this._sessionShowInfoId);
             this._session = null;
         }
+
+        this._passwordBox.hide();
+        this._cancelButton.grab_key_focus();
+        this._okButton.reactive = false;
     }
 
     _onUserChanged() {